/**
 * 存储用户信息
 */

const initState = {}

export function user (state = initState, action) {
  // 执行命令
  if (action.type === 'get/user') {
    return action.user
  }

  if (action.type === 'clear/user') {
    return {}
  }

  return state
}